<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<%@ taglib prefix="s" uri="/struts-tags" %>

<div id="c">
	<div id='promotions'>
		<s:include value="promotions.jsp"/>
	</div>
	<div id='promotion' class="hide">
		<s:include value="promotion.jsp"/>
	</div>
	<div id='items-selector' class="hide">
		<s:action name="items_selector" executeResult="true"/>
	</div>
	<div id='target' class="hide">
		<s:include value="target.jsp"/>
	</div>
</div>
<script type="text/javascript">
    var current = "#promotions";
	$("button").button();
	
	$("#create").click(function(){
		$("#promotions").fadeOut("slow", function(){
			$("#promotion").fadeIn("slow");
			current = "#promotion";
		});
		return false;
	});
	
	$("#promotion-ok").click(function(){
		$("#promotion").fadeOut("slow", function(){
			$("#items-selector").fadeIn("slow");
			current = "#items-selector";
		});
		return false;
	});
	
	$("#items-selector-back").click(function(){
		$("#items-selector").fadeOut("slow", function(){
			$("#promotion").fadeIn("slow");
			current = "#promotion";
		});
		return false;
	});
	
	$("#finish").click(function(){
		
	});
	
	$("button.cancel").click(function(){
		$(current).fadeOut("slow", function(){
			$("#promotions").fadeIn("slow");
			current = "#promotions";
		});
		return false;
	});
</script>